<?php
	session_start();
	require_once("../db_connect.php");
	require_once("filter.php");

	//ボランティア一覧表示
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet"  href="../../css/admin.css" type="text/css" />
<head>
<title>管理者画面</title>
</head>
       <body>
		<div id="topmain" >
			<div id="topwaku">ボランティア管理</div>
				<div id="enpty"></div>
					<div id="topimage"><a href="manager_create.php" >管理者登録</a></div>
					<div id="topimage"><a href="ManagerLogout.php" >ログアウト</a></div>
		</div>
		<div id="leftmain">
			<div id="leftmainwaku">
				<div id="koumoku"><a href="../../manager_index.php" >・管理トップページ</a></div>
			</div>
		</div>
		<div id="centerup">
		<div id="centerwaku">
			<div id="centertitle">
				<div id="centerchara">ボランティア一覧</div>
			</div>
			</div>
			<div id="centerinsert">
			<div id="centerinsert2">
<form action="ManageVolunteersDelete.php" method="POST" >
<table border="1" >
<tr>
<th></th>
<th>ボランティアID</th>
<th>会員ID</th>
<th>ボランティア名</th>
<th>内容</th>
<th>詳細</th>
<th>削除</th>
</tr>
<?php

$sth = "SELECT volunteer_information_id,user_id,volunteer_name,content
		FROM volunteer_information";

$res =& $db->query($sth);
	if (PEAR::isError($res)) {			//SQLの実行に失敗すればここでエラー文を出力
		die($res->getMessage());
	}
	while ($row =& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
		echo "<tr>";
		echo "<th><input type='checkbox' name='volunteer_delete[]' value='".$row['volunteer_information_id']."' /></th>";
		echo "<th>".$row['volunteer_information_id']."</th>";
		echo "<th>".$row['user_id']."</th>";
		echo "<th>".$row['volunteer_name']."</th>";
		echo "<th>".mb_strimwidth($row['content'],0,20,'…')."</th>";
		echo "<th><a href='manage_volunteer_detail.php?volunteer_detail_id=".$row['volunteer_information_id']."' >詳細</a></th>";
		echo "<th><a href='ManageVolunteerDelete.php?volunteer_delete_id=".$row['volunteer_information_id']."' >削除</a></th>";
		echo "</tr>";
	}
?>
</table>
<input type="submit" value="削除" />
</form>
</div>
</div>
</div>
</body>
</html>